home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 4719 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.2 KB

  1. Path: mail2news.demon.co.uk!genesis.demon.co.uk
  2. From: Lawrence Kirby <fred@genesis.demon.co.uk>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Can main() function be called?
  5. Date: Tue, 06 Feb 96 15:19:24 GMT
  6. Organization: none
  7. Message-ID: <823619964snz@genesis.demon.co.uk>
  8. References: <823183263.118@fountain.demon.co.uk> <4f1mv0$2fd@cloner4.netcom.com> <4f65a4$b8k@news.microsoft.com>
  9. Reply-To: fred@genesis.demon.co.uk
  10. X-NNTP-Posting-Host: genesis.demon.co.uk
  11. X-Newsreader: Demon Internet Simple News v1.27
  12. X-Mail2News-Path: genesis.demon.co.uk
  13.  
  14. In article <4f65a4$b8k@news.microsoft.com>
  15.            a-cnadc@microsoft.com "Dann Corbit" writes:
  16.  
  17. >You would certainly have to be careful.  This is the source of a 
  18. >famous recursion bug:
  19. >
  20. >int main()
  21. >{
  22. >   main();
  23. >}
  24. >
  25. >This is sure to crash in a heinous way on any system where it can
  26. >be compiled.
  27.  
  28. That's true but there is nothing special about main in this respect.
  29. Any recursive system must include a termination condition to prevent
  30. unbounded recursion.
  31.  
  32. You can't say that the program above has a bug unless you know what it was
  33. intended to do! :-)
  34.  
  35. -- 
  36. -----------------------------------------
  37. Lawrence Kirby | fred@genesis.demon.co.uk
  38. Wilts, England | 70734.126@compuserve.com
  39. -----------------------------------------
  40.